package test.com.sms.poc;

import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.parser.PdfTextExtractor;



public class PDFReaderExample
{
		public static void main(String[] args)  throws Exception
		{
			readPdfAsTextWithItext();
		}
		
		
		private static void readPdfAsTextWithItext() throws Exception 
		{
			 	PdfReader reader = new PdfReader("C://temp//ppt.pdf");
			 	
			 	int pages = reader.getNumberOfPages();
	 			for (int i = 1; i<= pages; i++)
	 			{
	 				String s = PdfTextExtractor.getTextFromPage(reader, i);
	 				System.out.println("********************************************************");
	 				System.out.println("************** Page " + i + " **********************************");
	 				System.out.println("********************************************************");
	 				System.out.println(s);
	 			}
		}

		
}
